package cn.jasonone.tio.tcp.commons;

/**
 * 系统指令
 * @author xujie
 * @version 1.0
 * @date 2022/1/18 15:58
 */
public enum SystemCommand implements Command {
    /**
     * 心跳指令
     */
    Heartbeat(1, -1);
    private int code;
    private int group;
    private byte type;

    SystemCommand(int code, int group) {
        this.code = code;
        this.group = group;
        this.type = Command.COMMAND_SYSTEM_TYPE;
    }

    @Override
    public int getCode() {
        return code;
    }

    @Override
    public int getGroup() {
        return group;
    }

    @Override
    public byte getType() {
        return type;
    }
}
